<template>
	<view class="mainbgc mainpadding">
		<header-top :messageInfo="{typeFlag:true,message:'预收款余额',liner:false}"></header-top>
		<!-- 账户信息 -->
		<view class="neijianju">
			<view class="ffffff dingbu">
				<view class="flexbetween headerbgc2 mainpadding ">
					<view class="titletext">预收款账户</view>
					<view class="titletext">金额</view>
				</view>
				<view class="mainpadding flexbetween xinxi" v-for="(item,index) in data.list" :key="index">
					<view class="nostrongtext">{{item.account_name}}</view>
					<view class="lansetext">{{item.money}}</view>
				</view>
			</view>
		</view>
		<!-- 底部 -->
		<view class="bottombox ffffff flexbetween">
			<view class="titletext">合计</view>
			<view class="lansetext">{{data.total_money}}</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				customers_id:"",
				data:{
					list:[],
					total_money:""
				}
			}
		},
		onLoad(options) {
			let data = JSON.parse(decodeURIComponent(options.msg));
			this.customers_id = data.customers_id
			this.getlist()
		},
		methods: {
			getlist(){
				httpRequest.request("appapi/manage/finance/collection_advance_money", 'POST', {
					customers_id:this.customers_id
				} , false, false, true).then(res => {
					this.data = res.data
				}).catch(err => {
					// httpRequest.toast(err.msg);
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.neijianju{
		padding-bottom:264rpx ;
	}
	.bottombox{
		padding: 30rpx 30rpx 60rpx;
		position: fixed;
		bottom: 0;
		left: 0;
		width: 100%;
		box-sizing: border-box;
	}
	.xinxi{
		padding-bottom: 30rpx;
		border-bottom: 2rpx solid rgba(153, 153, 153, 0.05);
	}
	.lansetext{
		font-size: 28rpx;
		font-family: PingFang SC-Bold, PingFang SC;
		font-weight: bold;
		color: #0BBDCB;
	}
	.dingbu {
		overflow: hidden;
		border-radius: 28rpx 28rpx 0 0;
	}

	.headerbgc2 {
		background-image: url('@/static/image/system/headerbgc2.png');
	}
</style>
